    <?php 
    include_spip('classes/alohacart');
    $cart = new AlohaCart();
    $cart_products = $cart->GetProducts();
    ?>
    
    <script src="#CHEMIN{includes/smartspin/smartspinner.js}" type="text/javascript"></script>
    <link href="#CHEMIN{includes/smartspin/smartspinner.css}" rel="stylesheet" type="text/css" />
    
    <input type="hidden" id="num_products" name="num_products" value="<?php echo $cart->CountProducts(); ?>" />
    
    <table width="100%" cellpadding="0" cellspacing="1">
	   <tbody>                            
            <tr>
                <th><:alohacart:photo:></th>
                <th><:alohacart:article:></th>
                <th width="60%"><:alohacart:titre:></th>
	            <th><:alohacart:quantity:></th>
                <th><:alohacart:price_one:></th>
                <th><:alohacart:price:></th>
                <th></th>
            </tr>
    <?php foreach ($cart_products as $product) { ?>
    <tr>
        <td><?php $code = '<a href="'.$product["img_file"].'" rel="gallery"><img src="'.$product["img_file"].'" /></a>';
                  echo filtrer('image_reduire', $code, null, 50); ?>
        </td>
        <td><?php echo $product["article"]; ?></td>
        <td><?php if ($product["link"]) { ?>
                <a target="_blank" href="<?php echo $product["link"]; ?>"><?php echo $product["titre"]; ?></a>
            <?php } else { ?>
                <?php echo $product["titre"]; ?>
            <?php } ?>
        </td>									
        <td>
        <input class="quantity" type="text" name="products[<?php echo $product["id_product"]; ?>][quantity]" value="<?php echo $product["quantity"]; ?>"
               style="width: 70px;"  data-id_product="<?php echo $product["id_product"]; ?>" />
                    <:alohacart:pcs:>
        </td>
        <td><?php echo $product["price_one"]; ?> <:alohacart:local_currency:></td>
		<td><?php echo $product["price"]; ?> <:alohacart:local_currency:></td>
        <td>
            <center>                
                <a class="delete_link" href="javascript:;" data-id_product="<?php echo $product["id_product"]; ?>" >
                    <:alohacart:delete:>
                </a>                
            </center>
        </td>
    </tr>
    <?php } ?>
    </tbody>
    </table>
    <strong><:alohacart:cart_quantity:>: </strong> #ALOHACART_CART_QUANTITY <:alohacart:pcs:><br />
    <strong><:alohacart:total_price:>: </strong> #ALOHACART_CART_PRICE <:alohacart:local_currency:><br />   
    
 <script>
    var id_product_change_quantity = '#ENV{id_product_change_quantity}';
    
    $('.quantity').each(function(){
        <?php if (lire_config('alohacart/add_spinner')) { ?>
        $(this).spinit({min:0/*,max:10*/,stepInc:1,height:22,initValue:$(this).val() });
        <?php } ?>
        if ($(this).attr('data-id_product') == id_product_change_quantity)
            $(this).focus();
    });
    
 </script>        